testReadWrite{
  RedisReplyDecoder redisDecoder=new RedisReplyDecoder();
    os=Unpooled.buffer();
    new StatusReply(message).write(os);
    assertTrue(receive instanceof StatusReply);
    assertEquals(message,receive.data());
    os=Unpooled.buffer();
    new ErrorReply(message).write(os);
    assertTrue(receive instanceof ErrorReply);
    assertEquals(message,receive.data());
    os=Unpooled.buffer();
    new BulkReply(Unpooled.wrappedBuffer(message.getBytes())).write(os);
    assertTrue(receive instanceof BulkReply);
    assertEquals(message,((ByteBuf)receive.data()).toString(Charsets.US_ASCII));
    os=Unpooled.buffer();
    new IntegerReply(integer).write(os);
    assertTrue(receive instanceof IntegerReply);
    assertEquals(integer,receive.data());
    new MultiBulkReply(new Reply[]{new StatusReply(message),new ErrorReply(message),new MultiBulkReply(new Reply[]{new StatusReply(message)}),new BulkReply(Unpooled.wrappedBuffer(message.getBytes())),new IntegerReply(integer)}).write(os);
    assertTrue(receive instanceof MultiBulkReply);
    Reply[] data=(Reply[])receive.data();
    assertEquals(message,data[0].data());
    assertEquals(message,data[1].data());
    assertTrue(data[2] instanceof MultiBulkReply);
    Reply[] data2=(Reply[])data[2].data();
    assertEquals(message,data2[0].data());
    assertEquals(message,((ByteBuf)data[3].data()).toString(Charsets.US_ASCII));
    assertEquals(integer,data[4].data());
}
